const odooModelName = 'account.move'

const fields_default = {}

const detail_columns = [
  'company_id__name',
  'state__name',
  'invoice_origin',
  'name',
  'invoice_date',
  'invoice_date_due',
  'partner_id__name',
  'partner_shipping_id__name',
  'invoice_user_id__name',
  'amount_total',
  'amount_residual'
]

const formItems = [
  'invoice_date',
  'invoice_date_due',
  'partner_id',
  'partner_shipping_id',
  'invoice_user_id'
]

const child_configs = {
  invoice_line_ids: {
    columns: [
      'product_id__name',
      'name',
      'account_id__name',
      'price_unit',
      'quantity',
      'price_subtotal'
    ],
    formItems: ['product_id', 'name', 'account_id', 'price_unit', 'quantity']
  }
}

const Model = {
  name: odooModelName,

  configs: {
    fields_default,
    detail_columns,
    child_configs,
    formItems,
    handle: {
      edit: { hidden: true }
    }
  }
}
export default Model
